function user_login() {
    var $username = $("#log_user");
    var $password = $("#log_pwd");

    $.ajax({
        type: "post",
        url: "login",
        data: {
            username: $username.val(),
            password: $password.val()
        },
        success: function (data) {

            var json = JSON.parse(data);
            console.log(json);
            console.log(json.status);
            console.log(json.msg);


            if (json.status === "true") {
                window.location.href = "index"
                $.ajax({
                    type: "post",
                    url: "index",
                    success: function (result) {
                        console.log(result)
                    }
                });
            } else if (data === "false") {

            }

        }
    })
}